//
//  AsyncTask.h
//  Async
//
//  Created by world on 13-6-5.
//  Copyright (c) 2013年 world. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Async+Private.h"
/**
 __weak only supports ios5.0 
 __unsafe_unretained is the same as __weak
 */
@interface AsyncTask : NSOperation{
    @public  id (^_task)(void);
    @public SEL _callback;
    @public __unsafe_unretained  id  _target; //weak reference to prevent chain reference 
    @public id  _result;
    @public NSMutableDictionary* _context;
}

@property(nonatomic,strong) id (^task)(void);
@property(nonatomic) SEL callback;
@property(nonatomic, unsafe_unretained) id target; //weak reference to prevent chain reference
@property(nonatomic, strong) id result;
@property(nonatomic, strong, readonly) NSMutableDictionary* context;


@end
